package cc.linker.steplink.crm.service.impl;

import cc.linker.steplink.crm.dao.ClientRobotDao;
import cc.linker.steplink.crm.domain.RobotDynamicPo;
import cc.linker.steplink.crm.service.IClientRobotService;
import org.apache.ibatis.annotations.Param;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;

/**
 * @author snake
 * @date 2019/8/27
 **/
@Service
public class ClientRobotServiceImpl implements IClientRobotService {

    @Autowired
    private ClientRobotDao clientRobotDao;


    @Override
    public List<Map<String, Object>> articlelist(Map<String, Object> map) throws Exception {
        return clientRobotDao.articlelist(map);
    }

    @Override
    public Integer addRobotArticle(Map<String, Object> map) {
        return clientRobotDao.addRobotArticle(map);
    }


    @Override
    public Integer delRobotArticle(Map<String, Object> map) throws Exception {
        return clientRobotDao.delRobotArticle(map);
    }

    @Override
    public List<Map<String, Object>> getUserArticleInfo() {
        return clientRobotDao.getUserArticleInfo();
    }

    @Override
    public String getArticleLabelByOrgIdAndType(String orgId, String type) {
        return clientRobotDao.getArticleLabelByOrgIdAndType(orgId, type);
    }

    @Override
    public String getLastPushTimeByOpenIdAndToken(String openId, String token) {
        return clientRobotDao.getLastPushTimeByOpenIdAndToken(openId, token);
    }

    @Override
    public List<Map<String, Object>> getUserPushArticle(String openid, String token) {
        return clientRobotDao.getUserPushArticle(openid, token);
    }

    @Override
    public List<String> getArticleIdByLabel(String oneLabelId, String orgId)
    {
        return clientRobotDao.getArticleIdByLabel(oneLabelId,orgId);
    }

    @Override
    public List<String> getPushArticleId(String openid,String token)
    {
        return clientRobotDao.getPushArticleId(openid,token);

    }

    @Override
    public Map<String,String> getOneArticle(String oneArticleId,String orgId)
    {
        return clientRobotDao.getOneArticle(oneArticleId,orgId);
    }

    @Override
    public  Integer addRobotStatistics(Map<String, Object> map) throws Exception
    {
        return clientRobotDao.addRobotStatistics(map);
    }

    @Override
    public List<Map<String, String>> getOrgIds() throws Exception
    {
        return clientRobotDao.getOrgIds();

    }

    @Override
    public Integer getMaintainNum(String orgId) throws Exception
    {
        return clientRobotDao.getMaintainNum(orgId);
    }

    @Override
    public Integer getReadTime(String orgId,String startTime,String endTime) throws Exception
    {
        return clientRobotDao.getReadTime(orgId,startTime,endTime);

    }

    @Override
    public Integer getTranRate(String orgId, String startTime,String endTime) throws Exception
    {
        return clientRobotDao.getTranRate(orgId,startTime,endTime);
    }

    @Override
    public Integer getTouchNum(String orgId, String startTime,String endTime) throws Exception
    {
        return clientRobotDao.getTouchNum(orgId,startTime,endTime);
    }

    @Override
    public Integer getFollowNum(String orgId,String startTime,String endTime) throws Exception
    {
        return clientRobotDao.getFollowNum(orgId,startTime,endTime);

    }

    @Override
    public Integer getUnfollowNum(String orgId,String startTime,String endTime) throws Exception
    {
        return clientRobotDao.getUnfollowNum(orgId,startTime,endTime);

    }

    @Override
    public String getActivity(String orgId) throws Exception
    {
        return clientRobotDao.getActivity(orgId);

    }

    @Override
    public Integer getMaintainTimes(String orgId, String type) throws Exception
    {
        return clientRobotDao.getMaintainTimes(orgId,type);
    }


    @Override
    public List<RobotDynamicPo> getRobotDynamicList(Map<String, Object> param){
        return clientRobotDao.getRobotDynamicList(param);
    }
    @Override
    public Integer getActiveFans(String orgId) throws Exception
    {
        return clientRobotDao.getActiveFans(orgId);
    }

    @Override
    public Integer getOrderCount(String orgId) throws Exception
    {
        return clientRobotDao.getOrderCount(orgId);
    }


    @Override
    public Integer getMaintainPerson(String orgId,String type) throws Exception
    {
        return clientRobotDao.getMaintainPerson(orgId,type);
    }


    @Override
    public Integer adjustmentTimes(String orgId,String type) throws Exception
    {
        return clientRobotDao.adjustmentTimes(orgId,type);
    }

    @Override
    public Map<String,Object> maintainBlock(Map<String, String> param) throws Exception
    {
        return clientRobotDao.maintainBlock(param);
    }

    @Override
    public List<Map<String,Object>> robotChart(Map<String, String> param) throws Exception
    {
        return clientRobotDao.robotChart(param);
    }

}
